import requests
from fake_useragent import UserAgent

if __name__ == "__main__":
  url = 'https://www.baidu.com'

  ua = UserAgent()
  headers = {'User-Agent': ua.random}

  proxies = {
    'http': 'http://10.10.1.10:3128',  # 如果需要代理，请修改成实际的代理地址和端口
    'https': 'http://10.10.1.10:1080',
  }

  response = requests.get(url, headers=headers, proxies=proxies)

  print(response.text)
